<?php
 session_start();
$arr = $_SESSION['name'];
$sql="SELECT comment_id FROM news_zan WHERE user_name='$arr'";
 $link = mysqli_connect("127.0.0.1","root","","news");
 mysqli_set_charset($link, "utf8");
 $res=mysqli_query($link, $sql);
if(mysqli_num_rows($res)>0){
		while($raw = mysqli_fetch_assoc($res)){
                $results[]=$raw;
		}
		echo json_encode($results);
	}
?>